﻿<vuc:VNetUserControl x:Class="VNet.VisiSuite.Controls.MetroIconMenu" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:vuc="clr-namespace:VNet.VisiSuite.Controls"
        mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>
        <!--<ResourceDictionary Source="../Assets/Styles/AppStyles.xaml"/>-->

        <Style x:Key="MetroIconText" TargetType="TextBlock">
            <Setter Property="FontFamily" Value="Segoe UI" />
            <Setter Property="FontSize" Value="13.33" />
            <Setter Property="FontWeight" Value="Normal" />
            <Setter Property="Foreground" Value="#FF00AADE" />
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="Margin" Value="0,4,0,0" />
            <Style.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Opacity" Value="0.25" />
                </Trigger>
            </Style.Triggers>
        </Style>

    </UserControl.Resources>
    <ItemsControl x:Name="_menu" VerticalAlignment="Center" HorizontalContentAlignment="Right" HorizontalAlignment="Right" IsEnabled="{Binding IsEnabled}" Foreground="Transparent"
            Background="Transparent" BorderBrush="White" BorderThickness="0">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <WrapPanel Orientation="Horizontal" />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <StackPanel Background="{Binding Background}"  Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="{Binding Spacing}" IsEnabled="{Binding Path=IsEnabled, ElementName=_menu}">
                    <vuc:MetroIconButton IsEnabled="{Binding Path=IsEnabled}" Visibility="{Binding Path=ButtonVisibility}"/>
                    <TextBlock Padding="{Binding Path=Padding}" IsEnabled="{Binding Path=IsEnabled}" Visibility="{Binding TitleVisibility}" Style="{StaticResource MetroIconText}" Foreground="{Binding Path=Foreground}"
                            Text="{Binding Path=Title}" />
                </StackPanel>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
</vuc:VNetUserControl>